import 'package:json_annotation/json_annotation.dart';
import 'base_entity.dart';

part 'role.g.dart';

@JsonSerializable(explicitToJson: true)
class Role extends BaseEntity {
  final String? code;
  final String? name;
  final List<String>? userIds;

  Role({
    super.id,
    super.created,
    super.updated,
    super.deleted,
    this.code,
    this.name,
    this.userIds,
  });

  factory Role.fromJson(Map<String, dynamic> json) => _$RoleFromJson(json);

  @override
  Map<String, dynamic> toJson() => _$RoleToJson(this);
}
